package com.alkalinesolutions.json.core;

import com.alkalinesolutions.json.core.impl.FormattedJSONTextEmitter;

public class FormattedSerializer extends CompactSerializer {

//	 private StructureWalker walker;
//	 private FormattedJSONTextEmitter handler;
//	 private StringWriter writer;

	public FormattedSerializer() {
		super();
		handler = new FormattedJSONTextEmitter();
		handler.setWriter(writer);
	}

	public int getPrettyPrintIndentation() {
		return ((FormattedJSONTextEmitter) handler)
				.getPrettyPrintIndentation();
	}

	public boolean isCollapsingEmptyStructures() {
		return ((FormattedJSONTextEmitter) handler)
				.isCollapsingEmptyStructures();
	}

	public boolean isPaddedWithTabs() {
		return ((FormattedJSONTextEmitter) handler).isPaddedWithTabs();
	}

	public boolean isUsingTabsForIndenting() {
		return ((FormattedJSONTextEmitter) handler)
				.isUsingTabsForIndenting();
	}

	public void setCollapsingEmptyStructures(
			final boolean collapsingEmptyStructures) {
		((FormattedJSONTextEmitter) handler)
				.setCollapsingEmptyStructures(collapsingEmptyStructures);
	}

	public void setPaddedWithTabs(final boolean paddedWithTabs) {
		((FormattedJSONTextEmitter) handler)
				.setPaddedWithTabs(paddedWithTabs);
	}

	public void setPrettyPrintIndentation(final int prettyPrintIndentation) {
		((FormattedJSONTextEmitter) handler)
				.setPrettyPrintIndentation(prettyPrintIndentation);
	}

	public void setUsingTabsForIndenting(final boolean usingTabsForIndenting) {
		((FormattedJSONTextEmitter) handler)
				.setUsingTabsForIndenting(usingTabsForIndenting);
	}

}
